package com.shangxia.user.mq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ProjectName: sxcloud
 * @ClassName: MQListener
 * @Time: 2021/11/6
 * @Author: zhouy
 * @Description:
 * @Experience:
 */

@Slf4j
@Component
public class MQListener {

    @RabbitListener(queues = "simple.queue")
    public void listenerMQ(String msg) {
        System.out.println("接受消息:" + msg);
    }

}
